<?php

!defined('IN_ROOT') && exit('Access Denied');

class sitecontrol extends base {

    function sitecontrol(& $get,& $post) {
        $this->base( & $get,& $post);
        $this->load("site");
        $this->load("sysmap");
        $this->load("line");
        $this->load("area");
        $this->load("views");
    }

   function onlist() {
    	$sid = intval($this->get[2]);
		$site = $_ENV['site']->get($sid);
        $metakeywords = $site['keywords'];
        $metadescription = $site['descs'];
		$data = $this->getsite_cache($sid);
		//var_dump($data);
        include template('site');
    }
    function online() {
        $siteid = intval($this->get[2]);
        $sysid = intval($this->get[3]);
        $cateid = intval($this->get[4]);
        $areaid = intval($this->get[5]);
        $site = $_ENV['site']->get($siteid);
        $catemod = $this->catemod;
        $cateconfig = $this->cateconfig;
        //var_dump($cateconfig);
        $data = $_ENV['sysmap']->get_linelist($siteid,$sysid,$cateid,$areaid);
        $toname = $_ENV['area']->getname_byid($areaid);
        $navtitle = $site['name'].'到'.$toname.'旅游报价';
        $metakeywords = $site['name'].'到'.$toname.'旅游'.$site['name'].'至'.$toname.'旅游价格'.$site['name'].'去'.$toname.'旅游费用';
        $metadescription = '漫游网提供'.$site['name'].'到'.$toname.'旅游报价'.$site['name'].'到'.$toname.'旅游线路'.$site['name'].'至'.$toname.'旅游价格'.$site['name'].'去'.$toname.'旅游费用。';
        include template('line');
    }
    function onlineshow() {
        $lid = intval($this->get[2]);
        $sid = intval($this->get[3]);
        $site = $_ENV['site']->get($sid);
        $dd = $_ENV['line']->get($lid);
        $listprice = $_ENV['line']->getpricelist($lid);
        $ds = $_ENV['line']->get_day($lid);
	$listdays = $_ENV['line']->get_days($lid);
        $de = $_ENV['line']->get_descs($lid);
        include template('lineshow');
    }
    function ontickets() {
    	$vid = intval($this->get[2]);
    	$sid = intval($this->get[3]);
    	$site = $_ENV['site']->get($sid);
    	$view = $_ENV['views']->get($vid);
    	$ticket = $_ENV['views']->get_ticket($vid);
    	include template('tickets');
    	
    }

}
?>